/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author LYS
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmPuArrivalvouch extends BasicModel<PmPuArrivalvouch> {
  djno?: string; // 送货单号
  shDate?: string; // 送货日期
  projectno?: string; // 项目编码
  projectname?: string; // 项目名称
  srmCode?: string; // SRM单据号
  createByName?: string; // 发起人
  pmPUArrivalVouchsList?: any[]; // 子表列表
}

export const pmPuArrivalvouchList = (params?: PmPuArrivalvouch | any) =>
  defHttp.get<PmPuArrivalvouch>({ url: adminPath + '/material/arrival/pmPuArrivalvouch/list', params });

export const pmPuArrivalvouchListData = (params?: PmPuArrivalvouch | any) =>
  defHttp.post<Page<PmPuArrivalvouch>>({ url: adminPath + '/material/arrival/pmPuArrivalvouch/listData', params });

export const pmPuArrivalvouchForm = (params?: PmPuArrivalvouch | any) =>
  defHttp.get<PmPuArrivalvouch>({ url: adminPath + '/material/arrival/pmPuArrivalvouch/form', params });

export const pmPuArrivalvouchSave = (params?: any, data?: PmPuArrivalvouch | any) =>
  defHttp.postJson<PmPuArrivalvouch>({ url: adminPath + '/material/arrival/pmPuArrivalvouch/save', params, data });

export const pmPuArrivalvouchDelete = (params?: PmPuArrivalvouch | any) =>
  defHttp.get<PmPuArrivalvouch>({ url: adminPath + '/material/arrival/pmPuArrivalvouch/delete', params });


export const pmPuArrivalvouchListPoOrderData = (params?: PmPuArrivalvouch | any) =>
  defHttp.post<Page<PmPuArrivalvouch>>({ url: adminPath + '/material/arrival/pmPuArrivalvouch/listPoOrderData', params });
